<?php
 class ListNode{
 	private $data;
 	private $next;
 	private $previous;
 	
 	public function __construct($data){
 		$this->data=$data;
 		$this->next=NULL;
 		$this->previous=NULL;
 	}
 	
 	public function __destruct(){
 		unset($this->data);
 		unset($this->next);
 		unset($this->previous);
 	}
 	
 	public function setData($data){
 		$this->data=$data;
 	}
 	
 	public function getData(){
 		return $this->data;
 	}
 	
 	public function setNext($next){
 		$this->next=$next;
 	}
 	
 	public function getNext(){
 		return $this->next;
 	}
 	
 	public function setPrevious($previous){
 		$this->previous=$previous;
 	}
 	
 	public function getPrevious(){
 		return $this->previous;
 	}
 	
 	public function display(){
 		echo "[".$this->data."]";
 	}
 }
 
 ?>